/* order-list.scss */
/* 列表页容器 */
.order-list-page {
	background-color: #f7f8fa;
	min-height: 100vh;
	padding: 20rpx;
	box-sizing: border-box;
}

/* 统计卡片 */
.stats-card {
	display: flex;
	background: #ffffff;
	border-radius: 16rpx;
	padding: 32rpx 24rpx;
	margin-bottom: 24rpx;
	box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.03);

	.stat-item {
		flex: 1;
		text-align: center;
		position: relative;

		&:first-child::after {
			content: '';
			position: absolute;
			right: 0;
			top: 50%;
			transform: translateY(-50%);
			width: 1rpx;
			height: 60rpx;
			background-color: #eee;
		}

		.value {
			display: block;
			font-size: 40rpx;
			font-weight: 600;
			color: #333;
			line-height: 1.4;
		}

		.label {
			font-size: 24rpx;
			color: #666;
		}

		&.highlight {
			.value {
				color: #e4393c;
			}
		}
	}
}

/* 筛选栏 */
.filter-bar {
	background: #fff;
	border-radius: 16rpx;
	padding: 20rpx;
	margin-bottom: 24rpx;

	.u-search {
		margin-bottom: 24rpx;
	}
}

/* 滚动容器 */
.order-scroll {
	height: calc(100vh - 360rpx);
}

/* 加载更多组件 */
.u-loadmore {
	padding: 32rpx 0;
}

/* 订单项卡片 */
.order-item-card {
	background: #fff;
	border-radius: 16rpx;
	padding: 24rpx;
	margin-bottom: 24rpx;
	position: relative;
	overflow: hidden;
	box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.03);

	/* 头部 */
	.header {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding-bottom: 24rpx;
		margin-bottom: 24rpx;
		border-bottom: 1rpx solid #f5f5f5;

		.order-no {
			font-size: 26rpx;
			color: #666;

			&::before {
				content: '✧';
				margin-right: 8rpx;
				color: #2979ff;
			}
		}

		.u-tag {
			transform: scale(0.9);
		}
	}

	/* 商品列表 */
	.goods-list {
		.goods-item {
			display: flex;
			padding: 24rpx 0;
			position: relative;

			& + .goods-item {
				&::before {
					content: '';
					position: absolute;
					top: 0;
					left: 0;
					right: 0;
					height: 1rpx;
					background: repeating-linear-gradient(90deg, #eee 0%, #eee 50%, transparent 50%);
					background-size: 16rpx 1rpx;
				}
			}

			.u-image {
				flex-shrink: 0;
				border: 1rpx solid #f5f5f5;
			}

			.goods-info {
				flex: 1;
				margin-left: 24rpx;
				overflow: hidden;

				.title {
					display: -webkit-box;
					-webkit-box-orient: vertical;
					-webkit-line-clamp: 2;
					overflow: hidden;
					text-overflow: ellipsis;
				}

				.spec {
					font-size: 24rpx;
					color: #999;
					margin: 12rpx 0;
					@include u-line-clamp(1);
				}

				.price-line {
					display: flex;
					justify-content: space-between;
					align-items: center;

					.price {
						color: #e4393c;
						font-size: 28rpx;
						font-weight: 500;

						&::before {
							content: '¥';
							font-size: 80%;
						}
					}

					.count {
						color: #666;
						font-size: 26rpx;

						&::before {
							content: '×';
							margin-right: 4rpx;
						}
					}
				}
			}
		}
	}

	/* 统计行 */
	.summary {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 24rpx 0;
		margin-top: 24rpx;
		border-top: 1rpx dashed #eee;

		.total {
			font-size: 26rpx;
			color: #666;
		}

		.amount {
			display: flex;
			align-items: baseline;

			.highlight {
				color: #e4393c;
				font-size: 32rpx;
				font-weight: 600;
				margin-left: 12rpx;

				&::before {
					content: '¥';
					font-size: 80%;
				}
			}
		}
	}

	/* 操作按钮 */
	.actions {
		display: flex;
		justify-content: flex-end;
		gap: 16rpx;
		margin-top: 24rpx;
		padding-top: 24rpx;
		border-top: 1rpx solid #f5f5f5;

		.u-button {
			font-size: 26rpx;
			height: 56rpx;
			line-height: 56rpx;
			padding: 0 32rpx;
			border-radius: 40rpx;

			&[type='primary'] {
				background: linear-gradient(45deg, #2979ff, #6799ff);
			}

			&[type='success'] {
				background: linear-gradient(45deg, #19be6b, #3dd598);
			}

			&[type='error'] {
				background: linear-gradient(45deg, #fa3534, #ff7870);
			}
		}
	}
}

/* 适配暗黑模式 */
@media (prefers-color-scheme: dark) {
	.order-list-page {
		background: #121212;
	}

	.stats-card,
	.filter-bar,
	.order-item-card {
		background: #242424;
		box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.15);

		.stat-item .value,
		.order-no,
		.title,
		.price {
			color: #e0e0e0 !important;
		}

		.label,
		.spec,
		.total {
			color: #9e9e9e !important;
		}

		.header,
		.goods-item::before,
		.summary {
			border-color: rgba(255, 255, 255, 0.1) !important;
		}
	}
}
